# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *

from docs.feeds import LatestPageChanges
feeds = {
    'changes': LatestPageChanges,
}

urlpatterns = patterns('docs.views',
    url(
        r'^$',
        'index',
    ),
    
    url(
        r'^(?P<lang>[a-z-]+)/$',
        'document',
        {'url': ''},
        name = 'document-index',
    ),
    url(
        r'^(?P<lang>[a-z-]+)/search/$',
        'search',
        name = 'document-search',
    ),
    url(
        r'^(?P<lang>[a-z-]+)/_images/(?P<path>.*)$',
        'images',
    ),
    url(
        r'^(?P<lang>[a-z-]+)/_source/(?P<path>.*)$',
        'source',
    ),
    url(
        r'^(?P<lang>[a-z-]+)/(?P<url>[\w./-]*)/$',
        'document',
        name = 'document-detail',
    ),
)


urlpatterns += patterns('',
    (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
)

